<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>文章列表</title>
    <link rel="stylesheet" href="./libs/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./css/iconfont.css">
    <link rel="stylesheet" href="./css/main.css">
    <script src="./libs/jquery-1.12.4.min.js"></script>
    <!-- 引入模板引擎js文件 -->
    <script src="./libs/template-web.js"></script>
    <script src="./libs/bootstrap/css/bootstrap.min.css"></script>
    <!-- 引入分页插件 -->
    从<script src="./libs/bootstrappaginator/bootstrap-paginator.min.js"></script>
    <!-- 引入http地址文件 -->
    <script src="./js/http.js"></script>
    <!-- 引入文章列表js文件 -->
    <script src="./js/article_list.js"></script>
</head>

<body>
    <div class="container-fluid">
        <div class="common_title">
            文章列表
        </div>
        <div class="container-fluid common_con">
            <div class="row opt_btns">
                <div class="col-xs-6">
                    <form class="form-inline">
                        <select id="selCategory" name="" class="form-control input-sm">
                            
                        </select>
                        <select id="selStatus" name="" class="form-control input-sm">
                            <option value="">所有状态</option>
                            <option value="草稿">草稿</option>
                            <option value="已发布">已发布</option>
                        </select>
                        <input type="button" id="btnSearch" class="btn btn-default btn-sm" value="筛选">
                    </form>
                </div>
                <div class="col-xs-6">
                    <a href="article_release.html" class="btn btn-success btn-sm pull-right" id="release_btn">发表文章</a>
                </div>
            </div>
            <table class="table table-striped table-bordered table-hover mp20">
                <thead>
                    <tr>
                        <th>标题</th>
                        <th>作者</th>
                        <th>分类</th>
                        <th class="text-center">发表时间</th>
                        <th class="text-center">状态</th>
                        <th class="text-center" width="100">操作</th>
                    </tr>
                </thead>
                <tbody>
                    
                </tbody>
            </table>
            <div class="row text-center" style="cursor: pointer;">
                <select  id="perPage" style="float:left;margin-left:40px;">
                    <option value="6">每页显示6条信息</option>
                    <option value="15">每页显示15条信息</option>
                    <option value="30">每页显示30条信息</option>
                    <option value="50">每页显示50条信息</option>
                </select>
                <ul class="pagination"></ul>
            </div>
        </div>
    </div>
    <!-- 创建下拉列表的模板结构 -->
    <script type="text/template" id="cateTemp">
        <option value="">所有分类</option>
        {{each}}  
            <option value= {{$value.id}}>{{$value.name}}</option>
        {{/each}}
    </script>
    <!-- 创建文章列表模板结构 -->
    <script type="text/template" id="articleListTemp">
        {{each data}}
            <tr>
                <td>{{$value.title}}</td>
                <td>{{$value.author}}</td>
                <td>{{$value.category}}</td>
                <td class="text-center">{{$value.date}}</td>
                <td class="text-center">{{$value.state}}</td>
                <td class="text-center">
                    <a href="article_release.html?id={{$value.id}}" class="btn btn-default btn-xs">编辑</a>
                    <a href="javascript:void(0);" class="btn btn-danger btn-xs delete" data-id = {{$value.id}}>删除</a>
                </td>
            </tr>
        {{/each}}
    </script>
</body>

</html>